package 博客.组合模式;

public class Client {
    public static void main(String[] args) {
        //学校
        School school = new School("华南理工大学广州学院");

        //专业
        College college1 = new College("计算机工程学院");
        College college2 = new College("外国语学院");


        //班级
        Class aClass1 = new Class("软件1班");
        Class aClass2 = new Class("软件2班");

        Class aClass3 = new Class("日语1班");
        Class aClass4 = new Class("日语2班");

        //对学院，班级添加操作
        school.add(college1);
        school.add(college2);

        college1.add(aClass1);
        college1.add(aClass2);

        college2.add(aClass3);
        college2.add(aClass4);

        //展示所有组织操作
        System.out.println("------------------展示学校所有信息-----------------------");
        school.display();
        System.out.println("------------------展示计算机学院所有信息-----------------------");
        college1.display();
    }
}
